package com.pmoc.framework.core.config.driver;

import com.pmoc.framework.core.client.CallBack;
import com.pmoc.framework.core.model.Entity;

/**
 * DataDriver
 *
 * @author humdeef
 * @summary DataClient
 * @since 2019-05-13 18:44
 */
public interface DataClient {

    /**
     * 添加值
     *
     * @param entity
     * @return
     */
    Boolean add(Entity entity);

    /**
     * 添加回调
     *
     * @param entity
     * @param callback
     * @return
     */
    Boolean add(Entity entity, CallBack callback);


    /**
     * 迁移值
     *
     * @param entity
     * @return
     */
    Boolean migrate(Entity entity);

    /**
     * 消费值
     *
     * @param appName
     */
    void consume(String appName);

    /**
     * 校验值
     *
     * @param appName
     */
    void checkData(String appName);
}
